Skip to content

Conversation

@beingzy
Copy link

@beingzy beingzy commented Jan 31, 2026

Motivation

  • Provide a minimal, uv-managed Python foundation to ingest real-time and historical ETH/USDT orderbook data from Binance and OKX and prepare for order placement.
  • Include a reproducible development and deployment setup using Docker Compose and PostgreSQL for storage.
  • Enable fast local validation via a simulated-data generator so parsing and storage logic can be exercised without live API access.

Description

  • Add project metadata and dependencies with pyproject.toml and a uv-friendly entrypoint script (orderbook_app.__main__:main).
  • Implement orderbook models (models.py) and parsers for Binance and OKX payloads (connectors/binance.py, connectors/okx.py) with a shared parse_levels helper.
  • Add async PostgreSQL helpers (storage/db.py) that create the orderbook_updates table and provide init_db/insert_update using asyncpg, and wire a simulated ingest flow in __main__.py that uses services/simulated.py.
  • Provide deployment artifacts: Dockerfile to build a container using uv and docker-compose.yml to start db (Postgres) and app, and document required REST/WebSocket endpoints and API permissions in README.md.

Testing

  • Added unit tests in tests/test_parsers.py that validate Binance/OKX snapshot/update parsing and the simulated update generator; these are runnable with pytest.
  • No automated tests were executed as part of this change (tests added but not run locally or in CI).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants